﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    public class Reserve
    {
        private readonly Aliyeye.Car.Net.Dal.Reserve dal = new Aliyeye.Car.Net.Dal.Reserve();
        public Reserve() { }
        public int Add(Model.Reserve model)
        {
            return dal.Add(model);
        }
        public bool Update(Model.Reserve model)
        {
            return dal.Update(model);
        }

        public bool GetCar(int reserveID, int carID, Int64 currentMax, decimal decimalRent, string strPayType, decimal decimalZPrice)
        {
            return dal.GetCar(reserveID, carID, currentMax, decimalRent, strPayType, decimalZPrice);
        }
        public bool Delete(int Id)
        {
            return dal.Delete(Id);
        }
        public Model.Reserve GetModel(int Id)
        {
            return dal.GetModel(Id);
        }

        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }
        public Model.Reserve GetModel(string Code)
        {
            return dal.GetModel(Code);
        }

        public bool FinishOrder(int carID, int reserveId, Int64 max, Model.Reserve model, decimal InputBillingAmount)
        {
            return dal.FinishOrder(carID, reserveId, max, model, InputBillingAmount);
        }

        public bool ReturnIllegal(Model.Reserve model)
        {
            return dal.ReturnIllegal(model);
        }

        /// <summary>
        /// 获取空闲订车时间列表
        /// </summary>
        /// <param name="carID"></param>
        /// <returns></returns>
        public DataSet GetFreeDateByCarID(int carID)
        {
            return dal.GetFreeDateByCarID(carID);
        }
    }
}
